﻿package com.gambit.happilyeverafter {
	import org.flixel.FlxState;
	import com.gambit.happilyeverafter.*;
	
	/**
	 * ...
	 * @author William Hutama
	 */
	public class LevelTransitionState extends FlxState {
		public static var level_list:Array = [
			MenuState,
			IntroLevel		
		];
		
		public static var next_level_index:uint = 0;
		
		
		public function LevelTransitionState() {
			super();
		}
		
		override public function update():void {
			var NextLevel:Class = level_list[LevelTransitionState.next_level_index];
			LevelTransitionState.next_level_index++;
			if (LevelTransitionState.next_level_index >= level_list.length) {
				LevelTransitionState.next_level_index = 0;
			}
			FlxG.switchState(NextLevel);
		}
	}

}